/*
 * @描述: 找回密码结果页面的页面逻辑
 * @版权所有: 广东国星科技有限公司
 * @商业授权: www.mscodecloud.com
 */
import React from 'react';
import { FormattedMessage } from 'umi-plugin-react/locale';
import { Button } from 'antd';
import Link from 'umi/link';
import Result from '@/components/Result';
import styles from './ForgotPasswordResult.less';

const actions = (
  <div className={styles.actions}>
    <Link to="/">
      <Button size="large">
        <FormattedMessage id="app.result.back-home" />
      </Button>
    </Link>
  </div>
);

const ForgotPasswordResult = ({ location }) => (
  <Result
    className={styles.forgotPasswordResult}
    type="success"
    description={
      <FormattedMessage
        id="app.retrieve-password-result.activation-email"
        values={{ email: location.state ? location.state.email : '' }}
      />
    }
    actions={actions}
    style={{ marginTop: 56 }}
  />
);

export default ForgotPasswordResult;
